﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using ART.Windows.HelpDesk.TicketServerCore;

namespace TestTicketCore
{
    public partial class Form1 : Form
    {
        private TicketCore m_Core;
        private Startup m_Startup;

        public Form1()
        {
            InitializeComponent();
            try
            {
                m_Startup = new Startup();
                m_Startup.Start(Application.StartupPath);
            }
            catch (Exception ex)
            {

            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            m_Core = new TicketCore();
            m_Core.Start();
            label1.Text = "State: Running";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            m_Core.Stop();
            label1.Text = "State: Stop";
        }


    }
}
